Changed array to be allocated during runtime