state: use maps, not arrays to store state