total_price method refactored