map replace by .upto method for creating array