Solution for Assignment2