add string algorithm