refactoring to prepare for banking features