This 'ie' string is a bit confusing.
Should it not be 'elementName.length() - 3'  and compared to 'ies' ?

Also, add spaces between the minus sign and the terms. All our source code does that.