renamed db to be more generic.