Slight logic simplification should not affect operation
Added -s option to change number of samples (in 1000's)