Added map to switch between buffers.