add LeftRight algorithm