achieve the function of autofill