added more hooks for using the function handler when a function isn't defined