Added lab6 code