refactored unused code