Add qep for layout rewrite