add mac and linux detection