adding support for array, and nested message. Caution:NOT TESTED