finish db part