fix one bug relating to outputs and enhance documentation
enhance documentation