refactoring of methods for all classes