adapt to bams