Add length attribute to list