improve function documentation