adapting to Mac