added loop to extract only people