Updated all the functions