Updated the arrays to dynamic init