add failwith in getLeft, getRigth branch