edit popup, update init function.