add documentation for list function