code used for 12/3 demo