Added innerproduct method