code refactoring
remove unnecessary function