refactored code
changes