Home page convert to use db