Updated Lab 2

Wrote required functionality