Add support for length function