refactor build referee as relational model