Completed exercise-6.5