refactor to get all information from models about relationships