Updating code samples (part 2)