fix example require

this fixes the example to use the new require API