change validate_update function