revamped problem generation