Modified the code to support OS X development environment