update new and edit page