compatible with new db model