Added BAM V2 support