update on fields on the database and then on the codes