Lab6 and Lab7, part of HW4