Create switch.js