refactored code
refactoring code