refactored class methods