update document title when changing top heading