Finished the sendcommand and waitforcommand functions but they don't work