While loop added, but still have bug.