added BAM writer