manage edit state