iterate through relations array for each node/way. functional but so slow :/