added a utility function to parse strings by a delimeter