Add comparison for equal costs