formatted indentation and removed trailing whitespace (thanks airline)