setting up configuration and entity manager