list function can now be called from cli