Add listing function, tests forthcoming