improve history support