refactaring all class