added conditional clause in getSubsetName