updated wiring.lua