Partly implemented sorting by match