writing strtok() in a for loop; testing malloc() scope in a sub-function, etc.