Add the homework 4 solution