nested functions, options