calculate matches quotes