fix the delimiter issues
replace that terrible n^2 algorithm with an n one.