sparse matrix multiplier using arrays