raoxunrong, refactor some code