Completed project 3 code