some refactor

Signed-off-by: Wang Zhen <lazybetrayer@gmail.com>