further implementations of deque and map.