changing the arrays to the new way