Added history rotation backend function