Seperated out the conversion of the array into a seperate method