match on instance as well as class