added slice and tests