Solving Assignement 2