new solution to guess random number problem