refactoring code; starting new