add my full HW3 code