new db code seems OK