finish exercise 5
finish fifth function