improving function documentation