code refactoring and functionality upgrade