loop added with tam generation
add forgotten changes