add arguments and fix command logic

Change-Id: I70110c6142fcc086163d782f9124aa0d08117d17