refactor initialization of array

refactor statements