updating the functions