first attempt to change from strtok to strtok_r