Solution for the Programming Assignement 2