added docs to the functions