use dataset instead of datapointer