made changes to cmd functionality