Query rewriter 1st checkin