adds a length function;