Based boost

do some refactoring