added circuit logic
added script to index.html
minus console logs, plus circuit switch in html