hw6.c, modprod.c implemented