rename var logic in editing