refactoring and and ready to go