Change length() to getLength()