indentation correction from code I extracted from another script.
indentation correction from code I extracted from another script.