cleanup db result processing