is typeOfSample still being used?  It looks like it is fetch but nothing is done with it