node generator and loop added