Added version validation code