refactor in all classes