write edit js