handling array reponses