Modified Enitity class.
Create Entity class object using createEntity funciton