Added calculate_coins