implement state change