Added persistence into postgres database