Attache function to ContextType as the actual type is function dependent