controller implementing & construct DB