added some documentation of some function