add support for array responses