Redid the getrelated function