updated script to check versions and OSs