lots of changes, esp. in db