added string replaceAt method