list command full implementation