Updated sample code; now it should actually work.