added query interface directly to smart pointers