ndmlist memory error

Changed the ndmlist declaration to populate the list before it is
accessed at run time, seems to have averted the memory allocation error
that I was experiencing