added logging flag,

experimental: added array handling code