working on refactoring everywhere