Adding persistence

merging on master!