added sparse input