use `setProperties()` instead of calling `set` twice. using `setProperties` makes it so that we trigger the change only once.