osx kaf and kof functions