fixed printDB function
some function fixed