generalized classes to use a standard method for querying data