quantity integration