My solution for the Assignment2