Added while loops.