improve code edit script