db callback for listener