progress on refactoring