Programming Assignment 2 solution by talitskiy