I will remove the if: if(firstPartLength >= 0) since firstPartLength should never be negative.