use % sign only when boxes' lines are equal