Changed functon so that delimiter can be of any length