added version check function