Part one of assignment 4