added reindent functionality