Fix code sample

Update class to call new on to the current version.