refactoring

Signed-off-by: Rack Lin <racklin@gmail.com>