for some reason switching the ifelse works on the related and subs