added support for entities