modify mem_queue