database calss improvements