modify code,not finish yet