added method to calculate ideal yearly cost