use inheritance for contactquery class behavior