documented some functions