some changes mainly for mac