make code compatible to OSX 10.10 Yosemite