changed cmd.c