refactoring- moving into a proper h file