setup code for handlers
everything compiles on OS X