separated second loop