factoring new and edit