redefined density arrays to be dynamically allocatable