Completing the functions exercise