added advanced bitbeam code.