calculating BEB