make some sparse operations more efficient