You can make a function where you create and return an entity.
For example:
function createEntity(x,y) e={} e.x= x e.y = y return e end newEntity = createEntity(10,10)
thanks. this will help a lot. thanks again