edit state functions