added doc to some funcs.