how to calculate weighted average cost of capital