multiplication is working now. fixed some errors. Wrong grad was used.