add better version check