submission for Programming Assignement 2