modified generation of number