Solution to project 1