reimplement FIFO memory model as Map