moved persist code into new app (for reasons)