Added getRelatedItems function.