add activerecord connection management