remove unused function
refactoring