allowing to specify the querying class