changed getvalid instead of isValid as vector is false if not set yet