Finished the update/insert function for the meta data