added text version of algorithm