minor typos in random() call. also reintegrating mersenne