convert to JS
switch to JS