problem set 4, question 4 tweaks