Added some functions and doc