improved sparse kernel