all the functions are done