Fixing homework 4