use better loop interface