finished database work