Course project 1 solution