slimmed down the JS