start refactoring code in new file