latest commit, a few changes to the database access