refactored bank