shrink code for version check