Just to throw a spanner around the room, should each following "sub,N" be based apon the original string or the resulting string as it stands at the time of reaching the said "sub,N" ?