updated for db and unificated variables names