add method to init database when first use