Finished part for 4 of week 4 exercise