ordering by maps or vectors