Solution to the couse project