Ported first example to OS X