Valuing firm's financial flexibility under default risk and bankruptcy costs: A WACC based approach