refactored code
modified package.json