changed code to use the replace action as a default for advanced dsl