Rand() fixed so it now doesn't give same sequence of random values