wiring up js