adding code for lab2