added function to duplicate size of an array