added Ira's script3