added newer version of entity api