database done for index page