Changed the implementation of partial product to use the newly created BlockMatrix