improved the iterator over the set of legal moves