another change within the array encode function