added payer, refactored a little bit