reorganise js