added some documentation to few functions
some more documentation to functions