set state on removal and insert