added -r option