Solution to course project #1