writing the editor part