printing both arrays and common data