improve DB class