adding entity manager for stages