moved init DB to correct class and function