added debug mode for viewing - saves memory for actual run