Homework 5, revision 3