replace strsep() with strtok() etc.