Made the maxVersions a parameter