ported Adam's DataSet class over