start refactoring for V2.0