added function replaceAll