Added code for project phase 4 part 1