add BER function. done.