comments removed and indentation corrected