more flexible version check