IMPROVED: ensured proper indentation for entire document