refactoring; checking function exists