State edit functionality