use map to lookup element numbers