redo
refactored code