Lab 4 code used for demo