Add function documentation
Correct function arity