Added database loading in mainActivity