Code for Lab4