refactoring and starting over......