length() function not available on String, use countElements instead