improve bam2 and bam db.