changed mmapChunker function