revised the sparse mulplication