apparently stable version of script