add code to complete payment loop