small refactoring of payments