relayout the code and correct using of mmap