reward refactor