avoid unnecessary database updates