common prefix helper