refactoring and setting up for recurring payment work