replace os detection by function testing