code refactoring - remove redundant codes