added integrating of quantities