context-aware function execution