removed refactored code