doing the whole homework 4 exercises