make the JS more idyomatic