updates to slice and sparse functionaliy
refactoring of sparse functionality