add code needed for mac app.