completed challenge 4 with tests and updated challenge 2 to proper formatting