changed some of the JS