added case - maxHalfCase (corrected)