add `length/1` function to api