added possiblity to persist by token