qcats = {0:2504,1:4976,2:8137};