completed dgemm implementation