main page loops done