add_class_and_refactor_code