js and edit working