refactoring js