Added while loop and updated readme