end match and ratings functions implemented