replace List by Vector when appropriate