added function documentation in fn-algorithms