modify strsplit to reduce dependencies