adds lastchange to state