support for subclasses + example (Entity)