added length and copare methods