function execution flow