rebased with q2ccore