Solution to Assignment2