start refactoring to a more object oriented approach