modified the scrip to use all bam files