updated docs and changed anonymous function name