refactor javascript
refactor javascript