add length directive
add length directive