add more documetation of functions