smart formatting of answer