string problem, doesnt catch cycles