updated dot-product with basic sage code