change the db structure and callback function into single value