Project 7 first part of the code