cleaning up the CLI and fixing duplicates problem again