Added maping to generate random number