bind context to user functions and when context functions are accessed