abstract the function of creating the information array