Solution to sparsing outside and inside(hopefully)