updated things to work with wp entities