add test for db writing