improve function documentation (thanks to @mvidner)