refactored banks_controller to move db logic to model