and deleting all the unneeded commands