improved kernel selection