code refactoring v1.1