solutions to trickier midterm problems