resolving the assignment2