added simpler interface for bam writing