added foreach loop to index.php, but it didn't help