move persistence core into utils