added filterBam function