make ConnectionManager a singleton, and close connection when done