make database work