Peiqi pulled to mac

merge the different version