Changing the example to be closer to paulp's code sample and closer to real use