Programming Assigment 2 resolved