fixed a small mistake in the usage of Random