modified install script to detect version