Added the function definition (plus more comments)....