add database and change some layout