rewrote & simplified most of the demo