removed unneeded clear_cmd