update reward assignment to use db