solution to the assignment-Nalin