It seems weird to assign to numValues here. That would change this for all future calls on this instance of the class. Is that what you want?