added --unique and --limit options