Extended add_dimension to allow setting new key type and pass kwargs