db processor refactor