revised loops