make sure function exists