calling replace on function param