added a getUniqueVals method and worked on the getPatterns method