abstract away some of the database functionality