updating to latest state