added support for array