use functions instead of variables for os detection