added Mac key handling