Updating code for Lab 3