changed .getLength() to .length