add replace to message directive