organizing the JS