add uppdated code for Project2
add updated code for project1