check inheritance and polymorph