adapted to new NDDB