added support for hash and array