js refactoring 4