db: second part kind of finished