refactored hard