adapted ordinal logic to work with breaks