Replace stackoverflow example with a less terrible one