add tests for cases when x and ? are both used
fixed a issue when both x and ? function are used