smarter indentation handling