ber calculation improvements