remove loops