better checking for os