Changes to get matching working