added links and change_headings function