improving edit-read switch