updated dot-product to include basic sage