change leftName to leftFlagName, same with right. Make a new LeftName, RightName.