basic cursor implementation and line endings array