reimplemented explode to use strsep