finished db writing