updated bam API for discover.cpp