added missing function okToGreet

the function okToGreet wasn't defined, so this example wouldn't work properly.