added index lookup when querying subclass