adding additional type check; emitting final (possibly partial) data set
adding order by