Homework 5, revision 2