add option -a and -r