redefinted how generate summary will work. takes as input dataset type and filename