added version detection to install script