finish db, closes #12