added replacement for common prefix