Correct length function
Add length function