metadata loop added