Solution for project1