added the rest of the functions