refactored problem definition