merge code from mac os