cleaning sparse array