fixed up code sample