added for loop to get all users in an array