fixbug. insert method in the case of having an argument
update document