docs for function-creating function