improve history control