profitability calculator
refactor