fix database loading
added a way to get result directly