add VersionSpec class, and tests