Changed sscanf to strtok