tomography code, but not working due to sparse multiply handling