added the updating, still need to test it