should work, now takes in numElements as a command line arg