work on refactoring.