Change arrays to be dynamic