I think this whole fn can be replaced with just `set`.