modular javascript edited