correcting the JS