Excercise on functions