a method to infer selection