solve the double bar problem