making quantities nestable