make function easyer to use and fix comment