better version detection