Enhance function documentation