TODO: inner product and gaussian elimination