some nice way to access database