code refactoring v1.3