added a loop to look through info received