My Assignment2 solution