updating to run seperately for each dataset