lots of additions, properly implementing the entity creation