completed DCES->record function (initial code)