added function to split string by separator characters to array