add support for arrays (issue #12)