Solution for Assignement 2