Example code for Lab 5 working