updates save function to write to the database when added from the contribute page