The variation of Λ doubling with rotational quantum number-BeH and BeD