prints database correctly