class_methods refactor