refactored code
changed imports