don't use global session, improve DB class