moved database init method to field