refactored code
removed unused imports