refactored methoeds