added the --export option