updated code to use field_update fn