new option -c and some fixes