remove unused code
refactor to remove unused code