Homework-5, problem 1 improved.