Added while statement.