added strtok
correction of strchr