core: made Density a union.