added optional prefix and suffix to replace()