cleanup setting of returned data frame