Added history adapter code