added support for arrays