Implemented the list command