updating random number and client main