added simple database interface