added an history persistant api