completed the coding of the commands