add calculate_profit method