changed regex split to substr for best performance