use relation to resolve references

return type is wrong here