refactoring of all