replace cursors and lines into collection