added optional n command line argument.