Added lab3 impl