homework 4 (better late then never)