add the code for filtering bam files