tring to make it faster with sparse
tring to make it faster with sparse