altered opp function to make payment