refactor code

Signed-off-by: WanBin <ouyangwanbin@gmail.com>