fixed a few bugs with input size and random numbers not being random