Implemented and tested dotProd()