compares arrays and prepares for further usage