completed lab 4, simple database functionality