some improvements for the samtools ctds