refactoring starting to work.