Added while loops