revised database generator