implement Circuits from week 2, OMG, scala worksheet is buggy