add fuctions to retrieve a relation based on its id