refines the select stmt2