reworked db processing of data from call