refactor.

Change-Id: I65d1837c17bd7b1110d0089cf1a1ef7cf0a2b5f7
Signed-off-by: Mao, Weicheng <weicheng.mao@gmail.com>