added string replacement functions