cli basic function implementation. now it works