added function to store vintages in the db