removed unused loop