switch to memmaps