Putting the JS logic back the way I found it. ooooops