now uses first command line argument as maxVal