made javascript much less wonky