adding entity
fixing a method in EntityUtil
implementing #166