got submission, refactoring
refactored code