update scrambleOrRemove method