remove unused loop