refactored apply to class methods