added slice constructor