Exercise 5: Implement  fnction