cleaned preinstall script