initial refactoring to create object controller