dome with algorithm - still having trouble transfering it to a text document