Fixed groups in match sorting, metric file

Added metric file, where metric should be implemented