- generalizing problem 1 even more!